From: Matthias Clasen Date: Wed, 15 Jun 2011 01:50:16 +0000 (-0400) Subject: Avoid a dereference-before-null-check X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~21020 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=32f0761daa7c86794d9b387f41cec42cbe02ab52;p=gtk%2B3.0.git Avoid a dereference-before-null-check --- diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 2515d3cf92..f6549194a7 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -3669,7 +3669,6 @@ _gtk_toolbar_paint_space_line (GtkWidget *widget, GtkToolbar *toolbar, cairo_t *cr) { - GtkToolbarPrivate *priv = toolbar->priv; GtkOrientation orientation; GtkStyleContext *context; GtkStateFlags state; @@ -3680,7 +3679,7 @@ _gtk_toolbar_paint_space_line (GtkWidget *widget, g_return_if_fail (GTK_IS_WIDGET (widget)); - orientation = toolbar ? priv->orientation : GTK_ORIENTATION_HORIZONTAL; + orientation = toolbar ? toolbar->priv->orientation : GTK_ORIENTATION_HORIZONTAL; context = gtk_widget_get_style_context (widget); state = gtk_widget_get_state_flags (widget);